﻿@using System.Globalization
@model CultuRAM.Models.AccreditingRequest

@{
    ViewBag.Title = "Edit";
}

<h2>Editar Pedido de Adesão</h2>

<table>
    <tr style="vertical-align: top;">
        <td style="width: 50%">
            @using (Html.BeginForm()) {
                @Html.ValidationSummary(true)

                <fieldset>
                    <legend>AccreditingRequest</legend>

                    @Html.HiddenFor(model => model.AccReqId)
                    @Html.HiddenFor(model => model.EntityId)

                    <div class="control-group">
                        @Html.LabelFor(model => model.RequestCode)
                        <div class="controls">
                            @Html.TextBoxFor(model => model.RequestCode, new {@readonly="readonly"})                           
                            @*@Html.ValidationMessageFor(model => model.EventProperty.PropertyId)*@
                        </div>
                    </div>
                    <div class="control-group">
                        @Html.LabelFor(model => model.RequestDate)
                        <div class="controls">
                            <div  class="controls">
                                @Html.TextBoxFor(model => model.RequestDate, new { @Value = Model.RequestDate.ToString("dd/MM/yyyy HH:mm", CultureInfo.InvariantCulture), @style = "", @readonly="readonly=" })
                                @*   <span class="add-on">
                                <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
                            </span>*@
                            </div>
                            @*@Html.ValidationMessageFor(model => model.RequestDate)*@
                        </div>
                    </div>
                    <div class="control-group">
                        @Html.LabelFor(model => model.AccreditingState)
                        <div class="controls">
                            @Html.DropDownList("AccStateId", String.Empty)                          
                            @*@Html.ValidationMessageFor(model => model.EventProperty.PropertyId)*@
                        </div>
                    </div>
                    <div class="control-group">
                        @Html.LabelFor(model => model.FeedbackDate)
                        <div class="controls">
                            <div id="datetimepickerFeedback"  class="controls input-append date">
                                @Html.TextBoxFor(model => model.FeedbackDate, new { @Value = Model.FeedbackDate.ToString("dd/MM/yyyy HH:mm", CultureInfo.InvariantCulture), @style = "width: 180px"})
                                <span class="add-on">
                                    <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
                                </span>
                            </div>
                            @*@Html.ValidationMessageFor(model => model.FeedbackDate)*@
                        </div>
                    </div>
                    <div class="control-group">
                        @Html.LabelFor(model => model.Feedback)
                        <div class="controls">
                            @Html.TextBoxFor(model => model.Feedback, new { cols = 40, @rows = 2 })                        
                            @*@Html.ValidationMessageFor(model => model.Feedback)*@
                        </div>
                    </div>
                    
     @*               <div class="control-group">
                        @Html.LabelFor(model => model.UserProfile)
                        <div class="controls">
                            @Html.DropDownList("UserId", String.Empty)      
                            @Html.ValidationMessageFor(model => model.UserProfile)
                        </div>
                    </div> *@
                    @Html.HiddenFor(model => model.UserId)           
                    
                    <div style="margin-top: 60px;">
                         @*<input type="submit" value="Save" />*@
                         <button type="submit" value="Save" class="btn btn-primary"><i class="icon-ok icon-white"></i> Guardar Alterações </button>
                         <a href="@Url.Action("Index", "AccreditingRequest")" class = "btn btn-default"><i class="icon-ban-circle"></i> Cancelar Alterações</a>
                    </div>
                       
                   
                </fieldset>
            }
        </td> 
        <td>
            <h4>Dados da Entidade</h4>
            <br/>
            <p>Tipo: <b>@Model.Entity.EntityType.EntityTypeName </b></p>
            <p>Nome: <b>@Model.Entity.Name </b></p>
            <p>Morada: <b>@Model.Entity.Address </b></p>
            <p>Cód-Postal: <b>@Model.Entity.PostalCode </b> | Localidade: <b>@Model.Entity.City.CityName</b></p>
            <p>Telefone: <b>@Model.Entity.Phone </b> | Telemóvel: <b>@Model.Entity.CellPhone</b></p>
            <p>Email: <b>@Model.Entity.Email </b></p>
            <p>Responsável: <b>@Model.Entity.Responsible </b> | Contacto: <b>@Model.Entity.ResponsibleContact</b></p>        
        </td> 

    </tr>
</table>


 @Scripts.Render("~/bundles/culturam") 